package com.bcbim.smart_water.equipment_alarm_monitoring.service;

import com.bcbim.smart_water.equipment_alarm_monitoring.mapper.EquipmentAlarmMonitoringMapper;
import com.bcbim.smart_water_interface.equipment_alarm_monitoring.dto.EquipmentAlarmMonitoringDTO;
import com.bcbim.smart_water_interface.equipment_alarm_monitoring.service.EquipmentAlarmMonitoringService;
import com.bcbim.smart_water_interface.equipment_alarm_monitoring.vo.EquipmentAlarmDataMonitoringVO;
import com.bcbim.smart_water_interface.equipment_alarm_monitoring.vo.EquipmentAlarmMonitoringVO;
import com.bcbim.smart_water_interface.equipment_alarm_monitoring.vo.ListEquipmentAlarmMonitoringVO;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Description:
 * @Author lihonggang
 * @Date 2021/11/02  15:20
 * @Version V1.0
 **/
@Service(timeout = 60 * 1000, group = "equipmentAlarmMonitoring", version = "1.0.0")
public class EquipmentAlarmMonitoringServiceImpl implements EquipmentAlarmMonitoringService {

    @Autowired
    private EquipmentAlarmMonitoringMapper equipmentAlarmMonitoringMapper;
    /**
     * @Description:  设备报警监控列表查询
     * @Date:  2021/11/2 15:27
     * @Param: [query]
     * @return: java.util.List<com.bcbim.pipeline_interface.equipmentAlarmMonitoring.vo.ListEquipmentAlarmMonitoringVO>
     * @Author: lihonggang
     **/
    @Override
    public List<ListEquipmentAlarmMonitoringVO> listEquipmentAlarmMonitoring(EquipmentAlarmMonitoringDTO query) {
        return equipmentAlarmMonitoringMapper.listEquipmentAlarmMonitoring(query);
    }

    /**
     * @param query
     * @Description: 查询设备报警监控总数
     * @Date: 2021/11/2 15:35
     * @Param: [query]
     * @return: int
     * @Author: lihonggang
     */
    @Override
    public int equipmentAlarmMonitoringCount(EquipmentAlarmMonitoringDTO query) {
        return equipmentAlarmMonitoringMapper.equipmentAlarmMonitoringCount(query);
    }

    /**
     * @param id
     * @Description: 查询设备报警监控详情
     * @Date: 2021/11/2 16:21
     * @Param: [id]
     * @return: com.bcbim.pipeline_interface.equipmentAlarmMonitoring.vo.EquipmentAlarmMonitoringVO
     * @Author: lihonggang
     */
    @Override
    public EquipmentAlarmMonitoringVO getEquipmentAlarmMonitoring(String id) {
        return equipmentAlarmMonitoringMapper.getEquipmentAlarmMonitoring(id);
    }

    @Override
    public EquipmentAlarmDataMonitoringVO getEquipmentAlarmDataMonitoring(String id) {
        return equipmentAlarmMonitoringMapper.getEquipmentAlarmDataMonitoring(id);
    }

    /**
     * @param id
     * @Description: 更新设备报警监控状态
     * @Date: 2021/11/2 16:57
     * @Param: [id]
     * @return: int
     * @Author: lihonggang
     */
    @Override
    public int updateEquipmentAlarmMonitoring(String id) {
        return equipmentAlarmMonitoringMapper.updateEquipmentAlarmMonitoring(id);
    }

    @Override
    public int updateEquipmentAlarmDataMonitoring(String id) {
        return equipmentAlarmMonitoringMapper.updateEquipmentAlarmDataMonitoring(id);
    }

    /**
     * @Description: 查询历史报警个数
     * @Date: 2021/11/3 9:43
     * @Param: []
     * @return: java.util.Map<java.lang.String, java.lang.String>
     * @Author: lihonggang
     **/
    @Override
    public int historicalAlarmCount(String roadId) {
        return equipmentAlarmMonitoringMapper.historicalAlarmCount(roadId);
    }

    /**
     * @Description: 查询待处理个数
     * @Date: 2021/11/3 9:47
     * @Param: []
     * @return: java.util.Map<java.lang.String, java.lang.String>
     * @Author: lihonggang
     **/
    @Override
    public int pendingCount(String roadId) {
        return equipmentAlarmMonitoringMapper.pendingCount(roadId);
    }

    /**
     * @Description: 查询已处理个数
     * @Date: 2021/11/3 9:50
     * @Param: []
     * @return: java.util.Map<java.lang.String, java.lang.String>
     * @Author: lihonggang
     **/
    @Override
    public int processedCount() {
        return equipmentAlarmMonitoringMapper.processedCount();
    }
}
